import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
export default new VueRouter({
    routes: [{
            path: "/",
            redirect: "/login-management",
        },

        {
            path: "/login-management",

            component: () => {
                return import ("@/views/login-management.vue");
            },
        },
        {
            path: "/main-page",

            component: () => {
                return import ("@/views/main-page.vue");
            },
            children: [{
                    path: "/library-management",

                    component: () => {
                        return import ("@/views/library-management.vue");
                    },
                },
                {
                    path: "/borrowing-management",

                    component: () => {
                        return import ("@/views/borrowing-management.vue");
                    },
                },
                {
                    path: "/user-management",

                    component: () => {
                        return import ("@/views/user-management.vue");
                    },
                },
                {
                    path: "/system-settings",

                    component: () => {
                        return import ("@/views/system-settings.vue");
                    },
                },
            ],
        },
        {
            path: "/library-management",

            component: () => {
                return import ("@/views/library-management.vue");
            },
        },
        {
            path: "/borrowing-management",

            component: () => {
                return import ("@/views/borrowing-management.vue");
            },
        },
        {
            path: "/user-management",

            component: () => {
                return import ("@/views/user-management.vue");
            },
        },

        {
            path: "/system-settings",

            component: () => {
                return import ("@/views/system-settings.vue");
            },
        },
    ],
});